﻿/*
 * @Autor: PK
 * @Date: 2021-03-31 16:29:00
 * @Description: 程序入口，可以同时创建多个SimulationApplication，多线程仿真
 */

using System;
using NLog;
using ShkSimulation.core.dao.output;
using ShkSimulation.core.dao.output.result;
using ShkSimulation.carsharing.impl;

namespace ShkSimulation.application {
	public class Application {
		
		public static readonly Logger logger = LogManager.GetLogger(nameof(Application));
        
		static void Main(string[] args) {
			LogManager.GlobalThreshold = LogLevel.Info;
			SimulationApplication application = new SimulationApplication(Environment.CurrentDirectory + @"\shk.yml", "示例");
			application.Init();
			ResultShower shower = new ConsoleResultShower();
			Result result = application.ConsinousRun(5);
			logger.Info($"示例运行完成：{DateTime.Now}");
			shower.Show(result);
		}
		
	}
}